import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: "HarmonyOS Next",
  lastUpdated: true,
  themeConfig: {
    search: {
      provider: 'local'
    },
    sidebar: [
      {
        text: 'HarmonyOS 开发准备',
        collapsed: true,
        items: [
          { text: '鸿蒙操作系统简介', link: '/quickstart/鸿蒙操作系统简介' },
          { text: '注册成为开发者', link: '/quickstart/注册成为开发者' },
          { text: 'DevEco Studio集成开发环境', link: '/quickstart/DevEco Studio 集成开发环境' },
          { text: '构建第一个HarmonyOS应用', link: '/quickstart/构建第一个HarmonyOS应用' }
        ]
      },
      {
        text: 'ArkTS 编程语言',
        collapsed: true,
        items: [
          { text: '简介', link: '/chapter1/Index' },
          { text: '基本语法', link: '/chapter1/基础语法' },
          { text: '函数', link: '/chapter1/函数' },
          { text: '面向对象', link: '/chapter1/面向对象.md' },
          { text: '泛型', link: '/chapter1/泛型.md' },
          { text: '空安全', link: '/chapter1/空安全.md' },
          { text: '模块与命名空间', link: '/chapter1/模块与命名空间.md' },
          { text: '异步并发', link: '/chapter1/异步并发.md' },
          { text: '多线程并发', link: '/chapter1/多线程并发.md' }
        ]
      },
      {
        text: 'ArkUI 方舟UI框架',
        collapsed: true,
        items: [
          { text: '简介', link: '/chapter2/Index' },
          { text: '基本语法', link: '/chapter2/ArkTS声明式UI基本语法' },
          { 
            text: '通用属性',link: '/chapter2/通用属性/盒子模型' ,
            collapsed: true,
            items: [
              { text: '盒子模型', link: '/chapter2/通用属性/盒子模型'},
              { text: '文本样式', link: '/chapter2/通用属性/文本属性'},
              { text: '位置设置', link: '/chapter2/通用属性/位置设置'},
              { text: '背景设置', link: '/chapter2/通用属性/背景设置'},
              { text: '形状剪裁', link: '/chapter2/通用属性/形状剪裁'},
              { text: '视效设置', link: '/chapter2/通用属性/视觉效果'},
              { text: '多态样式', link: '/chapter2/通用属性/多态样式'},
              { text: '样式复用', link: '/chapter2/通用属性/样式复用'}
            ]
          },
          { 
            text: '开发布局',link: '/chapter2/基础布局/Column' ,
            collapsed: true,
            items: [
              { text: '线性布局', link: '/chapter2/基础布局/Column'},
              { text: '弹性布局', link: '/chapter2/基础布局/Flex'},
              { text: '相对布局', link: '/chapter2/基础布局/RelativeContainer'},
              { text: '层叠布局', link: '/chapter2/基础布局/Stack'}
            ]
          },
          { 
            text: '基础组件',link: '/chapter2/基础组件/Text' ,
            collapsed: true,
            items: [
              { text: '文本组件', link: '/chapter2/基础组件/Text'},
              { text: '图片组件', link: '/chapter2/基础组件/Image'},
              { text: '按钮组件', link: '/chapter2/基础组件/Button'},
              { text: '输入框组件', link: '/chapter2/基础组件/InputText'},
              { text: '单选按钮', link: '/chapter2/基础组件/Radio'},
              { text: '切换按钮', link: '/chapter2/基础组件/Toggle'},
              { text: '进度条', link: '/chapter2/基础组件/Progress'},
              { text: '评分组件', link: '/chapter2/基础组件/Rating'},
              { text: '标记组件', link: '/chapter2/基础组件/Badge'}
            ]
          },
          { 
            text: '滚动容器',link: '/chapter3/Scroll' ,
            collapsed: true,
            items: [
              { text: '滚动（Scroll）',link: '/chapter3/Scroll' },
              { text: '轮播（Swiper）',link: '/chapter3/Swiper' },
              { text: '选项卡（Tabs）',link: '/chapter3/Tabs' },
              { text: '列表（List）',link: '/chapter3/List'},
              { text: '网格（Grid）',link: '/chapter3/Grid'},
              { text: '刷新（Refresh）',link: '/chapter3/Refresh'},
              { text: '瀑布流（WaterFlow）',link: '/chapter3/WaterFlow'},
            ]
          },
          { 
            text: '自定义组件',link: '/chapter4/自定义组件',
            items: [
              { text: '@Component',link: '/chapter4/自定义组件' },
              { text: '@Builder',link: '/chapter4/自定义构建函数' },
            ]
          },
          { 
            text: '页面路由',link: '/chapter5/Navigation',
            items: [
              { text: '页面导航（Navigation）',link: '/chapter5/Navigation' },
              { text: '路由（router）',link: '/chapter5/router' },
            ]
          }
        ]
      }
    ],
    socialLinks: [
      { icon: 'github', link: 'https://github.com/vuejs/vitepress' }
    ],
    outline: {
      level: [2,3],
      label: '本页目录' // 自定义大纲标题文字
    },
    footer: {
      message: '鸿蒙应用开发基础教程',
      copyright: 'Copyright © 2025-至今 wangqi'
    }
  }
})
